class GapfBoxLayout extends eui.LayoutBase{
	private w=0
	public constructor(w) {
		super();
		this.w =w;
	}
	public measure():void{
		super.measure();
	}
	public updateDisplayList(width: number, height: number){
		super.updateDisplayList(width, height)
		var count = this.target.numElements;
		var indexX=0;
		var indexY=0;
		for(var i=0;i<count;i++){
			var layout:eui.UIComponent =<eui.UIComponent>this.target.getElementAt(i)
			layout.setLayoutBoundsPosition(indexX,indexY)
			indexX+=layout.width;
			if(indexX >this.w){
				indexY +=layout.height;
				let la:eui.Label = <eui.Label>layout
				if(la &&la.width>this.w){
					var tw = la.width;
					la.width =this.w
					indexX = tw-la.width +50;
				}
			}	
		}
		
	}
}